package com.whq.thrift.api.web.admin.db.consumelog;

import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;

public class ConsumeLog implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	private Long id;
	private Date time;
	private String host;
	private String code;
	private String flow_id;
	private String seq;
	private Integer dir;
	private String api;
	private Long cost;
	private Integer result;
	private Date createtTime;
	private Integer count;
	
	public Integer getCount() {
		return count;
	}
	public void setCount(Integer count) {
		this.count = count;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Date getTime() {
		return time;
	}
	public void setTime(Date time) {
		this.time = time;
	}
	public String getHost() {
		return host;
	}
	public void setHost(String host) {
		this.host = host;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	
	public String getFlow_id() {
		return flow_id;
	}
	public void setFlow_id(String flow_id) {
		this.flow_id = flow_id;
	}
	public String getSeq() {
		return seq;
	}
	public void setSeq(String seq) {
		this.seq = seq;
	}
	public Integer getDir() {
		return dir;
	}
	public void setDir(Integer dir) {
		this.dir = dir;
	}
	public String getApi() {
		return api;
	}
	public void setApi(String api) {
		this.api = api;
	}
	public Long getCost() {
		return cost;
	}
	public void setCost(Long cost) {
		this.cost = cost;
	}
	public Integer getResult() {
		return result;
	}
	public void setResult(Integer result) {
		this.result = result;
	}
	public Date getCreatetTime() {
		return createtTime;
	}
	public void setCreatetTime(Date createtTime) {
		this.createtTime = createtTime;
	}
	
	public int getTableSeq() {
		int ret = 100;
		
		Date t = null;
		if (this.time == null) {
			t = new Date();
		} else {
			t = time;
		}
		Calendar calendar = Calendar.getInstance();
		calendar.setTime(t);
		return ret + calendar.get(Calendar.DAY_OF_MONTH);
	}

}
